perm filename PUBDFS.SAI[PUB,TES]3 blob
sn#077426 filedate 1973-12-10 generic text, type T, neo UTF8
00100 REQUIRE "VERSION.SAI" SOURCE_FILE;
00200 DEFINE NB = "COMMENT", TES = "COMMENT", RKJ = "COMMENT", CMU = "COMMENT",
00300 PLK = "COMMENT",
00400
00500 INITSIZES = "ISIZE←1000; SSIZE←200; ITSIZE←200; STSIZE←300; SIZE←100",
00600 REGULAR_SIZE = "1021", COMMENT Must be a prime ;
00700 BIG_SIZE = "2999",
00800 HUGE_SIZE = "8191", COMMENT can't exceed 2↑13-1 ;
00900
01000 COMMENT All the output lines tentatively placed in the current frame are
01100 stored in .PUI files and referenced by sequential number from
01200 the integer array OWLS (OWtput LineS). Its length is sufficient
01300 to hold every line of every column of every area in it. The
01400 general form of a string referenced from OWLS is:
01500 {<chars><cr>}...<lf> . One of the <chars> (the last) may be a
01600 line that needs to be justified in Pass Two. Each word break in
01700 such a substring is represented by a '13 (vert-tab) -- these
01800 mark the places that extra spaces may be added. Pass Two also
01900 needs to know about FONT changes -- in the present version, this
02000 is limited to underlining, superscripts, and subscripts. A FONT
02100 change is signalled by the character pair '177 <code>. Finally,
02200 Pass Two will fill in forward references marked ALTMODE.
02300
02400 Other information must be known about each string in OWLS. There
02500 must be an indication of how many spaces to add to a
02600 justify-line during Pass Two, and there must be mobility
02700 restrictions to assure that groups stay together and that
02800 section titles stay at tops of pages. This information is kept
02900 in an integer array MOLES (MObility of LinES) of the same size
03000 as OWLS. MOLES[J] is the descriptor for OWLS[J]. To access
03100 these entries, the value J is stored in an "area array"
03200 associated with the area the line was placed in, at element
03300 [C,L] for the C'th column and L'th line.
03400
03500 A Moles descriptor looks like this:
03600
03700 --------------------------------------------------
03800 | | |L|H|L|R|A|B| | |
03900 | | |O|O|E|I|B|E| | |
04000 | SHORT | FOOT |C|R|F|G|O|L| LABEL | LEAD |
04100 | | |K|I|T|H|V|O| | |
04200 | | | |Z| |T|E|W| | |
04300 --------------------------------------------------
04400 0.....6 7.....11-2-3-4-5-6-7-18..........31 32..35 ;
00100 COMMENT To avoid calling POINT to generate byte pointers, we use
00200 Swinehart's BBPP and our own BP. BBPP(N,GLOBAL,N) is like POINT
00300 but usually it will compile constants instead of procedure
00400 calls. BP is a macro which creates a byte pointer as the sum of
00500 a constant and two variables or expressions. Instead of
00600 POINT(6,ARR[J+4],35), say: BP(6,ARRIDA,J,+4,35). The first,
00700 fourth, and fifth arguments will be ROTed and LORed into a
00800 constant at compile time, and the second and third will be added
00900 to it at execution time. Be sure that ARRIDA points to ARR[0]
01000 at all times, and that the fourth argument either is absent or
01100 is a signed integer. ;
01200
01300 BP(S,A0,J,SIGNED_CONSTANT,P) = "(((35-(P)) ROT 6 LOR S) ROT 24 SIGNED_CONSTANT) +
01400 (A0) + (J)",
01500
01600 H1(WD) = "POINT(18,WD,17)", COMMENT, POINT can make constant byte pointers;
01700 H2(WD) = "POINT(18,WD,35)",
01800 Q1(WD) = "POINT(9,WD,8)",
01900 Q2(WD) = "POINT(9,WD,17)",
02000 Q3(WD) = "POINT(9,WD,26)",
02100 Q4(WD) = "POINT(9,WD,35)",
02200
02300 COMMENT Fields of MOLES ;
02400
02500 SHORTM(J) = "BP(7,MOLESIDA,""J"",,6)", COMMENT, How far short of the right
02600 margin ADJUST line is;
02700 FOOTM(J) = "BP(5, MOLESIDA,""J"",, 11)", COMMENT,
02800 If this line has footnotes, then this field is nonzero and
02900 matches the value in the corresponding field of the last
03000 line of its last footnote (a value of 31 means that footnote
03100 ends in a subsequent column);
03200 LOCKM(J) = "BP(1,MOLESIDA,""J"",,12)", COMMENT, This line can not be moved;
03300 HORIZM(J) = "BP(1,MOLESIDA,""J"",,13)", COMMENT, Only move to same line no. in another column;
03400 LEFTM(J) = "BP(1,MOLESIDA,""J"",,14)", COMMENT, If moved, also move line on my left;
03500 RIGHTM(J) = "BP(1,MOLESIDA,""J"",,15)", COMMENT, ... also line on my right;
03600 ABOVEM(J) = "BP(1,MOLESIDA,""J"",,16)", COMMENT, ... also line above me;
03700 BELOWM(J) = "BP(1,MOLESIDA,""J"",,17)", COMMENT, ... also line below me;
03800 ABV = "'2000000", BLW="'1000000", ABV_BLW="'3000000",
03900 LABELM(J) = "BP(14,MOLESIDA,""J"",,31)", COMMENT,
04000 Position in ITBL of head of L.L. of page labels of this line;
04100 LEADM(J) = "BP(4,MOLESIDA,""J"",,35)", COMMENT, Number of lead lines to assure if
04200 moved -- this is necessary because blank lines that happen
04300 to show up at the top of a column are deleted, but if the
04400 paragraph they lead is moved down, they must be restored;
04500
04600 COMMENT The last subscript used in MOLES and OWLS is stored in MOLES[0];
00100 COMMENT The symbol table method is hashed strings using quadratic
00200 search. Swinehart's "SYMSER.SAI[1,DCS]" has been used. That
00300 package declares two arrays [-1:SYMNO], where SYMNO+1 is prime.
00400 One array, SYM, holds the strings, and the other, NUMBER, holds
00500 their descriptors. The procedure SETSYM initializes the
00600 package. FLAG←LOOKSYM(STRING A) tells whether the string is in
00700 the table and sets SYMBOL to its index (or the index of where to
00800 enter it if not there). ENTERSYM(STRING A, INTEGER NUM) enters
00900 it in the table at SYMBOL and makes its descriptor be NUM (and
01000 sets ERRFLAG to TRUE and prints a message if the table is full).
01100
01200 The compiler requires that all symbols be unique at any block
01300 level, however, labels are totally global and although each
01400 label must have a different name from every other label, it may
01500 have the same name as another whatsit. Therefore, before a
01600 label is looked up or entered in the symbol table, a colon is
01700 appended to its name to guarantee its distinction. Furthermore,
01800 all lower case letters of every identifier are changed to upper
01900 case for symbol table purposes.
02000
02100 The fields of a descriptor D = NUMBER[SYMBOL] are:
02200 --------------------------------------------
02300 | DEPTH | SYMBOL | TYPE | IX |
02400 --------------------------------------------
02500 0.....4 5...........17 18..21 22..........35 ;
02600
02700 DEPTHWD(DESC) = "POINT(5,DESC,4)", COMMENT, the block depth;
02800 DEPTHN(S) = "BP(5,NUMBIDA,""S"",+1,4)",
02900 SYMBOLWD(DESC) = "POINT(13,DESC,17)",
03000 SYMBOLN(S) = "BP(13,NUMBIDA,""S"",+1,17)", COMMENT, This field always equals
03100 s, its subscript in NUMBER. When a local declaration in an
03200 inner block forces an outer definition to be stacked, this
03300 field of the descriptor tells where to restore it;
03400 TYPEWD(DESC) = "POINT(4,DESC,21)",
03500 TYPEN(S) = "BP(4,NUMBIDA,""S"",+1,21)", COMMENT, The symbol type (listed below);
03600 IXWD(DESC) = "POINT(14,DESC,35)", COMMENT, depending on TYPE, this may be a
03700 case index or a 14-bit pointer to the definition in some array;
03800 IXN(S) = "BP(14,NUMBIDA,""S"",+1,35)",
03900
04000 COMMENT The descriptor of a label, however, is:
04100 ---------------------------------------
04200 | PLIGHT | zeroes or ones | IX |
04300 ---------------------------------------
04400 0..1 2 ......... 21 22 ..... 35 ;
04500
04600 PLIGHTWD(DESC) = "POINT(2, DESC, 1)", COMMENT,
04700 1: Referenced but not yet defined. IX is the NUMBER posn of the mentioned Unit (or 0).
04800 2: Defined as the string in STBL[IX].
04900 0|3: Defined as a page label, but the exact page is still uncertain--
05000 DESC is a link to another label in the same plight:
05100 >0--ITBL[DESC], <0--NUMBER[-DESC], =-(2↑13)--end L.L. ;
00100 COMMENT Symbol Type → IX array conversion ;
00200
00300 COMMENT Type IX points to
00400 ---- ------------ ;
00500 GLOBALTYPE="1", COMMENT, Global Variable STBL ;
00600 LOCALTYPE="2", COMMENT, Local Variable SSTK ;
00700 INTERNTYPE="3", COMMENT, Internal Variable none (this is a case index);
00800 MANTYPE="6", COMMENT, MANUS Command Word none (this is a case index);
00900 PORTYPE="10", COMMENT, Portion ITBL ;
01000 PUNITTYPE="11", COMMENT, Print Value of Unit ISTK (same IX as Counter Value) ;
01100 AREATYPE="12", COMMENT, Area ISTK ;
01200 UNITTYPE="13", COMMENT, Unit ISTK ;
01300 MACROTYPE="14", COMMENT, Macro ISTK ;
01400
01500 COMMENT Now the STKs, TBLs, and NESTs will be introduced.
01600
01700 ISTK....
01800
01900 In ISTK are stored:
02000 (a) Modes and Variable Values to be restored upon block exit.
02100 (b) AREA, UNIT, MACRO, and Response Declarations local to this block.
02200 (c) Former margin positions in a NARROW/WIDEN nest.
02300 To push an m-word entry of type T onto ISTK, increment IHED by (m+1),
02400 check for stack overflow, and put the following descriptor
02500 at ISTK(IHED):
02600
02700 ---------------------------------------
02800 | T | SYM subscript | old value of IHED |
02900 ---------------------------------------
03000 0..8 9............21 22...............35
03100
03200 Now store the entries at IHED-1 to IHED-m. The header word at IHED is the
03300 one that IX points to. Note that it is in a linked list which is scanned at
03400 block exit to restore former conditions.
03500
03600 The types T are as follows: ;
03700 COMMENT AREATYPE = "12", COMMENT, Local Area Declaration;
03800 COMMENT UNITTYPE = "13", COMMENT, Local Unit Declaration;
03900 COMMENT MACROTYPE = "14", COMMENT, Local Macro Declaration;
04000 RESPTYPE = "15", COMMENT, Local Response Declaration;
04100 MARGTYPE = "16", COMMENT, Former margin positions in a NARROW//WIDEN Nest;
04200 TURNTYPE = "17", COMMENT, Former <chars><function> pair;
04300 MODETYPE = "18", COMMENT, Mode Words before block entry;
04400 NUMTYPE = "19", COMMENT, Former NUMBER descriptor;
04500 TABTYPE = "20", COMMENT, tab stops ;
04600 MIDTYPE = "21", COMMENT, saved paragraph params for BEFORE|AFTER|footnotes in mid-pgph ;
04700 FONTYPE = "22", COMMENT, Former font settings TES 11/15/73;
04750 PITYPE = "23", COMMENT, Former PiCHAR definitions TES 11/29/73 ;
04800
04900 IXTYPE(ANYIX) = "(ISTK[ANYIX] ROT 9 LAND '777)",
05000 BIXNUM(NAMED) = "BP(13, ISTKIDA, ""NAMED"", , 21)",
05100 IXOLD(ANYIX) = "(ISTK[ANYIX] LAND '37777)",
00100 COMMENT Fields of Entries in ISTK ;
00110
00120 PIWDS = "2",
00130 PIKEY(PI) = "ISTK[(PI)-1]", COMMENT the char after pi;
00140 PIVAL(PI) = "ISTK[(PI)-2]", COMMENT the string in SSTK that it emits;
00200
00300 MARGWDS = "4",
00400 LMARGX(MARG) = "ISTK[(MARG)-1]",
00500 RMARGX(MARG) = "ISTK[(MARG)-2]",
00600 OLD_MARGX(MARG) = "ISTK[(MARG)-3]",
00700 AREAX(MARG) = "ISTK[(MARG)-4]", COMMENT, ISTK IX of AREA with these margins ;
00800
00900 FONTWDS = "4", COMMENT TES 11/15/73 ;
01000 THISFONTX(FONT) = "ISTK[(FONT)-1]", COMMENT OF OUTER BLOCK ;
01100 OLDFONTX(FONT) = "ISTK[(FONT)-2]",
01200 OUTERX(FONT) = "ISTK[(FONT)-3]",
01300 COMMENT TES same as for MARG: AREAX(FONT) = "ISTK[(FONT)-4]";
01400
01500 TURNWDS = "1", COMMENT, CHR, FUN 7 bits each, to TURN back ON previous meaning;
01600
01700 NUMWDS = "1",
01800 OLD_NUMBER(SYM) = "ISTK[(SYM)-1]",
01900
02000 AREAWDS = "17",
02100 DISD(AREA_UNIT) = "ISTK[(AREA_UNIT)-1]", COMMENT, TRUE if disdeclared ;
02200 FULHIGH(AREA) = "ISTK[(AREA)-2]", COMMENT, 1 iff no LINES clause ;
02300 LINE1(AREA) = "ISTK[(AREA)-3]", COMMENT, Top line number used;
02400 LINECT(AREA) = "ISTK[(AREA)-4]", COMMENT, Number of lines used;
02500 FULWIDE(AREA) = "ISTK[(AREA)-5]", COMMENT, 1 iff no CHARS clause ;
02600 CHAR1(AREA) = "ISTK[(AREA)-6]", COMMENT, Leftmost character position;
02700 CHARCT(AREA) = "ISTK[(AREA)-7]", COMMENT, Width of whole area;
02800 TEXTAR(AREA) = "ISTK[(AREA)-8]", COMMENT, 1=TEXT AREA, 0=TITLE AREA;
02900 COLCT(AREA) = "ISTK[(AREA)-9]", COMMENT, Number of columns;
03000 COLWID(AREA) = "ISTK[(AREA)-10]", COMMENT, Width of each column;
03100 OLD_ACTIVE(AREA) = "ISTK[(AREA)-11]", COMMENT, If Open, array descriptor of active area in OLDPAGE;
03200 NEW_ACTIVE(AREA) = "ISTK[(AREA)-12]", COMMENT, If Open, array descriptor of active area in NEWPAGE;
03300 OPEN_ACTIVE(AREA) = "ISTK[(AREA)-
03400 (IF FRAMEIDA=NEWPGIDA≠0 THEN 12 ELSE 11)]",
03500 COMMENT "≠0" ABOVE ADDED APRIL 22, 1973 BY TES ;
03600 FOOTSTR(AREA) = "ISTK[(AREA)-13]", COMMENT, SSTK subscript of SEND FOOT string ;
03700 MARGINS(AREA) = "ISTK[(AREA)-14]", COMMENT, ISTK IX of MARGTYPE entry ;
03800 FONTS(AREA) = "ISTK[(AREA)-15]", COMMENT TES 11/15/73 ISTK IX of FONTTYPE entry ;
03900 TFONT(AREA) = "ISTK[(AREA)-16]", COMMENT TES 11/15/73 THISFONT;
04000 OFONT(AREA) = "ISTK[(AREA)-17]", COMMENT TES 11/15/73 OLDFONT ;
04100
04200 UNITWDS = "12",
04300 COMMENT DISD(AREA_UNIT) = "ISTK[(AREA_UNIT)-1]", COMMENT, see area def above;
04400 CTR_INIT(UNIT) = "ISTK[(UNIT)-2]", COMMENT, FROM initial value + 2↑14 ;
04500 CTR_STEP(UNIT) = "ISTK[(UNIT)-3]", COMMENT, BY step-value + 2↑6 ;
04600 PATT_CHRS(UNIT) = "ISTK[(UNIT)-4]", COMMENT, estimate based on chars in patterned TO value;
04700 CTR_CHRS(UNIT) = "ISTK[(UNIT)-5]", COMMENT, estimate based on unpatterned TO value;
04800 PARENT(UNIT) = "ISTK[(UNIT)-6]", COMMENT, IX of parent unit;
04900 PATT_PARENT(UNIT) = "ISTK[(UNIT)-7]", COMMENT, whether ! occurs in pattern;
05000 PATT_ALF(UNIT) = "ISTK[(UNIT)-8]", COMMENT, alphabet to convert CTR_VAL to:
05100 PATT_ALF... 0 1 2 3 4 5
05200 alphabet... template 1 i I a A ;
05300
05400 PATT_STRS(UNIT) = "ISTK[(UNIT)-9]", COMMENT, pointer to strings in SSTK;
05500 SON(UNIT) = "ISTK[(UNIT)-10]", COMMENT, IX of youngest son unit ;
05600 BROTHER(UNIT) = "ISTK[(UNIT)-11]", COMMENT, IX of brother unit ;
05700 IN_LINE(UNIT) = "ISTK[(UNIT)-12]", COMMENT, TRUE if INLINE option present ;
00100 MACROWDS = "4", RESPWDS = "7", SIGWDS = "9",
00200 BODY(DEF) = "ISTK[(DEF)-1]", COMMENT, points to body string in SSTK;
00300 NAMEPAR(MACRO) = "ISTK[(MACRO)-3]", COMMENT, LAND 2↑(ARGS-n) says n'th arg is by name;
00400 NUMARGS(DEF) = "ISTK[(DEF)-2]", COMMENT, no. of formal parameters;
00500 ODDMAC(MACRO) = "ISTK[(MACRO)-4]", COMMENT, 1 for ODD MACRO, 0 for [EVEN] MACRO;
00600 OLD_RESP(RESP) = "ISTK[(RESP)-3]", COMMENT, former response+200 or (<200) breaktable value;
00700 DEPTH_RESP(RESP) = "ISTK[(RESP)-4]", COMMENT, block level (unimplemented) ;
00800 NEXT_RESP(RESP) = "ISTK[(RESP)-5]", COMMENT, another resp. with similar recognizer;
00900 CLUE(RESP) = "ISTK[(RESP)-6]", COMMENT, encoding of the recognizer;
01000 VARIETY(RESP) = "ISTK[(RESP)-7]", COMMENT, see Table below ;
01100 SIGNAL(RESP) = "ISTK[(RESP)-8]", COMMENT, ASCII of Signal;
01200 RESP_SEP(RESP) = "ISTK[(RESP)-9]", COMMENT, ASCII of seps (up to 5), right byte=last sep;
01300
01400 COMMENT NEXT_RESP and CLUE for each VARIETY of response declaration:
01500
01600 Declaration VARIETY CLUE NEXT_RESP with
01700 ----------- ------- ---------------------- --------------
01800 AT <e> 0 Pointer to <e> in SSTK Same 1st letter & 2d letter|non-letter-ness
01900 AT <n> 1 n Next larger n
02000 AT <signal> 2 Number of characters Same first char
02100 AFTER <area|unit> 3 Symb. no. of area|unit (WAITRESP link only)
02200 BEFORE ... 4 " "
02300
02400 ITBL....
02500
02600 Has (1) Labels generated by {PAGE}. The entry looks like a
02700 NUMBER entry for a label, except PLIGHT is never 1.
02800 (2) Portion declarations--NOTE: no word may have left half = '400000;
02900 PORCH(PORT) = "ITBL[PORT]", COMMENT, 0-15: channel SENDing to,
03000 -1: FOOT, -2: declared but never SENT to, -3: sent to & declared but not RECEIVEd,
03100 -4: already RECEIVEd, -5: only mentioned in INSERT, -6: RECEIVEd AND Alphabetized ;
03200 PORSEQ(PORT) = "ITBL[(PORT)-1]", COMMENT, pointer to next PORTION in collating sequence ;
03300 PORFIL(PORT) = "ITBL[(PORT)-2]", COMMENT, ASCII of generated file's first name ;
03400 PORINT(PORT) = "ITBL[(PORT)-3]", COMMENT, ASCII of intermed. file's first name (if 1st in that file);
03500 COMMENT
03600 SSTK....
03700 Has (1) Values of Local Variables
03800 (2) Macro, Response, and Prepare Bodies
03900 (3) Unit PATT_STRS; PATT_VAL(PS) = "SSTK[PS]", COMMENT, current printing value;
04000 CTR_VAL(PS) = "SSTK[(PS)-1]", COMMENT, current counter value ;
04100 PREFIX(PS) = "SSTK[(PS)-2]", COMMENT, before ! OR template;
04200 INFIX(PS) = "SSTK[(PS)-3]", COMMENT, between ! and alphabet;
04300 SUFFIX(PS) = "SSTK[(PS)-4]", COMMENT, after alphabet .
04400 (4) SEND FOOT Strings for each declared AREA.
04410 (5) PICHAR Old values. (see PIVAL)
04500
04600 STBL....
04700 Has (1) Values of Global Variables
04800 (2) Values of Labels (set to '0&<last unit specified--SYMBOL no.>
04900 if undefined, so MANUS can check consistency of use)
05000 (3) Current file-block for every generated file getting sent to;
00100 COMMENT
00200
00300 SNEST...
00400 Has (1) Input strings to scan. They nest due to macro calls,
00500 responses, argument substitutions, RECEIVEs, and
00600 REQUIREs. This nesting is not synchronized with that
00700 of blocks, because a macro or argument body or a source
00800 file may have unmatched BEGINs, etc., so a separate
00900 stack is required.
01000 (2) Saved line number for previous source:
01100 The first six characters are the file name ;
01200 STRSCAN(S) = "SNEST[(S)-1]", COMMENT, a string to scan (STRSCAN(LAST)
01300 is the current one);
01400 LINESCAN(S) = "SNEST[S]", COMMENT, MACLINE or SRCLINE ;
01500
01600 COMMENT
01700
01800 INEST...
01900 Has (1) Input channels to scan. When reading from a file,
02000 just its channel number is kept instead of the whole
02100 string of course. However, a whole line at a time is
02200 stripped and scanned as if it were an input string.
02300 (2) Saved SOS page number for previous input file;
02400 CHANSCAN(S) = "INEST[(S)-1]", COMMENT, the channel number of a file to
02500 scan (CHANSCAN(LAST) is the current one or -1 if none)
02600 TECO files: channel no. stored here excess 100 ;
02700 PAGESCAN(S) = "INEST[S]", COMMENT, LH=PAGEMARKS RH=PAGEWAS Negated by RECEIVE if GEN-file;
02800
02900 COMMENT These are our DEVICE numbers;
03000 LPT = "1",
03100 TTY = "2",
03200 MIC = "3",
03300 XGP = "4",
03400
03500 COMMENT These are definctions to compare strings;
03600 NULSTR(S) = "(LENGTH(S) = 0)",
03700 FULSTR(S) = "(LENGTH(S) ≠ 0)",
03800 FALSTR(S) = "EQU(S, ""0"")",
03900 TRUESTR(S) = "¬EQU(S, ""0"")",
00100 COMMENT A record of each active frame and area is kept in a dynamically
00200 created array. Swinehart's ARRSER.SAI package creates such
00300 arrays. The array may be represented by an integer descriptor
00400 (we'll call it the array's IDA) which can be assigned to any array
00500 of variable upper bound (the array's ALIAS). Frame and area
00600 records contain IDAs of other records and of dynamic MOLES, OWLS,
00700 and area-arrays. All these arrays must be dynamically created
00800 because their existence is independent of block nests and even of
00900 their declarations -- for example, a BOX and its areas may be held
01000 over for several pages before insertion. THE FIRST ELEMENT OF EACH
01100 SUCH STRING ARRAY IS NOT A STRING BUT A GARBAGE-COLLECT LINK!!!
01200
01300 Two pages may be open at once, due to group overflow or to closing
01400 of one text area while others are still open. ;
01500
01600 COMMENT Here are the Aliases of the dynamic arrays:
01700
01800 IDA ALIAS Represents
01900 --- ----- --------------------------------------
02000 OLDPGIDA OLDPAGE Partly completed open page.
02100 NEWPGIDA NEWPAGE Overflow from OLDPAGE.
02200 FRAMEIDA THISFRAME Record of Frame we're PLACing in (PAGE or BOX).
02300 MOLESIDA MOLES Its MOLES array.
02400 OWLSIDA OWLS Its OWLS array.
02500 AREAIDA THISAREA Record of Area we're placing in.
02600 AA Its Area-Array.
02700 WBOXIDA WAITBOX Head of L.L. of Boxes held over.
02800
02900 A Frame Record is an integer array symbolized THISFRAME[0:PFREC|BFREC]: ;
03000 PFREC = "5", BFREC = "21",
03100 ARF = "THISFRAME[0]", COMMENT, head of LL of its area records;
03200 OWLSF = "THISFRAME[1]", COMMENT, IDA of its OWLS array;
03300 MOLESF = "THISFRAME[2]", COMMENT, IDA of its MOLES array;
03400 HIGHF = "THISFRAME[3]", COMMENT, n HIGH;
03500 WIDEF = "THISFRAME[4]", COMMENT, v WIDE;
03600 SHORTF = "THISFRAME[5]", COMMENT, new SHORTM array for XGP;
03700 COMMENT The rest apply only to a BOX FRAME;
03800 ULLB = "THISFRAME[6]", COMMENT, Upper Left Line covered in containing area INB;
03900 ULCB = "THISFRAME[7]", COMMENT, Upper Left Char covered;
04000 INB = "THISFRAME[8]", COMMENT, symbol no. of containing area;
04100 NEXTB = "THISFRAME[9]", COMMENT, link to next BOX -- two cases:
04200 If this box is held over → next such box in WAITBOX L.L.
04300 Otherwise → next box in this area (BOXA L.L.) ;
04400 comment, NEAR <where> encoded: about 12 words ;
00100 COMMENT An Area Record is an integer array symbolized THISAREA[0:AREC] -- ;
00200 AREC = "13",
00300 AAA = "THISAREA[0]", COMMENT, IDA of Area-Array (a 2-D array);
00400 ARA = "THISAREA[1]", COMMENT, IDA of next area record in this frame (ARF L.L.);
00500 OLD_ACTA = "THISAREA[2]", COMMENT, IDA of area record in up-level frame ;
00600 BOXA = "THISAREA[3]", COMMENT, IDA of first BOX in this area;
00700 INA = "THISAREA[4]", COMMENT, IDA of containing frame;
00800 STATA = "THISAREA[5]", COMMENT, Status:
00900 Unopened=0 Open=1 Closed=2 Dis-Declared=4 ;
01000 DEFA = "THISAREA[6]", COMMENT, ptr to definition in ISTK (or 0 if none);
01100 COMMENT If the area is open-- ;
01200 NBOXA = "THISAREA[7]", COMMENT, number of BOXes in the BOXA L.L.;
01300 COLA = "THISAREA[8]", COMMENT, column we're PLACing in;
01400 COMMENT If the area is closed or dis-declared-- ;
01500 LINECA = "THISAREA[9]", COMMENT, LINECT copied from ISTK ;
01600 COLCA = "THISAREA[10]", COMMENT, COLCT copied from ISTK ;
01700 ULLA = "THISAREA[11]", COMMENT, LINE1(AREA) copied from ISTK;
01800 COMMENT and AA[i,0] tells upper left character posn of column i ;
01900 XGENA="THISAREA[12]" , COMMENT, XGENLINES FOR AREA;COMMENT RKJ;
02000 OVERA="THISAREA[13]", COMMENT TES 11/14/73 OVEREST for col-1 of area;
02100
02200 COMMENT The Area-Array of a D-column M-line area is an integer array AA[1:2*D,0:M].
02300
02400 Column 1 Column 2 Column 3 ...
02500 "Leg" Foot Leg Foot Leg Foot ...
02600 lines already used * AA[1,0] AA[D+1,0] AA[2,0] AA[D+2,0] AA[3,0] AA[D+3,0] ...
02700 J'th line AA[1,J] AA[D+1,J] AA[2,J] AA[D+2,J] AA[3,J] AA[D+3,J] ...
02800 (*): H2=last placed line, H1=lines beneath covered by BOXes;
00100 COMMENT These "mode words" are BLT'ed to ISTK upon block entry ;
00200
00300 MODEWDS = "20" ;
00400
00500 TERNAL INTEGER BREAKM ; comment Break Mode ; DEFINE
00600 FILL="(BREAKM=0)", NOFILL = "(BREAKM≠0)", JUSTJUST="(BREAKM=1)", FLUSHL="(BREAKM=2)",
00700 FLUSHR="(BREAKM=3)", CENTER="(BREAKM=4)", IMPOSE="(BREAKM=5)", VERBATIM="(BREAKM=6)",
00800 REGNOFILL = "(BREAKM=7)" ;
00900 TERNAL INTEGER JUSTM ; DEFINE ADJUST="(JUSTM=1)", NOJUST="(JUSTM=0)" ;
01000 TERNAL INTEGER SPACEM ; DEFINE COMPACT="(SPACEM=2 ∨ FILL∧SPACEM=1)", RETAIN="(¬COMPACT)" ;
01100 TERNAL INTEGER CRBM ; DEFINE CRBREAK="(CRBM=1)", CRSPACE="(CRBM=0)" ;
01200 TERNAL INTEGER TWEENLFM, comment, N-1 from SUPERIMPOSE N;
01300 SINCELFM, comment, count no-LF lines;
01400 FIRSTIM, comment, f from INDENT f,r ;
01500 RESTIM, comment, r from INDENT f,r ;
01600 RIGHTIM, comment, g from INDENT f, r, g ;
01700
01800 GROUPM, comment, GROUP=1 APART=0;
01900 GLINEM, comment, MOLES Posn of 1st output line in the group;
02000 AREAIXM, comment, ISTK posn of Place Area;
02100
02200 TABTAB, comment either 0 or what TAB is TURNed ON as ;
02300
02400 LEADFM, comment, PREFACE in FILL mode ;
02500 LEADNM, comment, PREFACE in NOFILL mode ;
02600 SPREADM, comment, SPREAD, e.g., SINGLE SPACE → 1;
02700 ENDCASE, comment, how this block began: BEGIN=1 ONCE=2 BEFORE|AFTER|FOOTNOTES=3 ;
02800 STARTS, comment, clump depth in this block ;
02900 SHED , comment, Top of SSTK ;
03000 OLDIHED; COMMENT TES 11/15/73 OLD ISTK TOP ;
03100
03200 COMMENT TES 11/15/73 OLDFONT + THISFONT moved to last page ;
03300
03400 COMMENT Several linked list scans use these macros to generate code.
03500 LLHEAD symbolizes a variable pointing to the first element.
03600 LLNEXT(x) would determine the successor to x. The global variables
03700 LLPREV, LLTHIS, and LLPOST display the result of the scan. ;
03800
03900 DEFINE LLSCAN(LLHEAD, LLNEXT, LLSTOP) = "
04000 BEGIN LLTHIS ← LLHEAD MAX 0 ; LLPREV ← -1 ;
04100 WHILE LLTHIS ∧ ¬(LLSTOP) DO
04200 BEGIN
04300 LLPREV ← LLTHIS ; LLTHIS ← LLNEXT(LLTHIS) ;
04400 END ;
04500 LLPOST ← IF LLTHIS THEN LLNEXT(LLTHIS) ELSE 0 ;
04600 END",
04700 LLSKIP(LLHEAD, LLNEXT) = "
04800 IF LLPREV<0 THEN LLHEAD ← LLPOST
04900 ELSE LLNEXT(LLPREV) ← LLPOST ",
05000 LLINS(LLHEAD, LLNEXT, LLNEW) = "
05100 BEGIN
05200 IF LLPREV < 0 THEN LLHEAD ← LLNEW ELSE LLNEXT(LLPREV) ← LLNEW ;
05300 LLNEXT(LLNEW) ← LLTHIS ;
05400 END",
00100 COMMENT These are for scanners;
00200 LETTS = """!_QWERTYUIOPLKJHGFDSAZXCVBNMzxcvbnmlkjhgfdsaqwertyuiop""",
00300 DIGS = """0123456789""",
00400 CR = "'15", LF = "'12", SP = "'40", TB = "'11", FF = "'14", CRLF = "(CR&LF)",
00500 RUBOUT = "'177", VT = "'13", BAR = "'30",
00600 ALTMODE=IFC VERSION=SAILVER THENC "'175" ELSEC "'176" ENDC,
00700 RCBRAK=IFC VERSION=SAILVER THENC "'176" ELSEC "'175" ENDC,
00800
00900 COMMENT For the parser;
01000 SPASS(X) = "((X&NULL)&PASS)",
01100 IPASS(X) = "((X+0)+PASS)",
01200 DPASS = "BEGIN DCLR_ID←TRUE ; PASS; DCLR_ID←FALSE END",
01300 EMPTYTHIS = "BEGIN THISTYPE ← -EMPTYQ ; THISWD ← NULL END",
01400 EMPTYTHAT = "BEGIN THATTYPE ← -EMPTYQ ; THATWD ← NULL END",
01500 THISISFULL = "(THISTYPE ≠ -EMPTYQ)", THATISFULL = "(THATTYPE ≠ -EMPTYQ)",
01600 THISISID = "(THISTYPE ≥ 0)", THATISID = "(THATTYPE ≥ 0)",
01700 THISISCON = "(THISTYPE = -1)", THATISCON = "(THATTYPE = -1)",
01800 ITS(LIT) = "EQU(THISWD,""LIT"")", ITSV(EX) = "EQU(THISWD,EX)",
01900 NEXTS(LIT) = "EQU(THATWD,""LIT"")", NEXTSV(EX) = "EQU(THATWD,EX)",
02000 ITSCH(CHR) = "THISWD = ""CHR""", NEXTSCH(CHR) = "THATWD = ""CHR""",
02100
02200 COMMENT The character Table CHARTBL categorizes each of the 128 ASCII
02300 characters for both the Parser and the Filler. SPCODE is a
02400 variable field set by TURN ON (and reset by TURN OFF) to a value
02500 fetched from the constant field SPCHAR.;
02600
02700 UPCASE(CH) = "BBPP(7, CHARTBL[0], 6) + (CH)",
02800 FAMILY(CH) = "BBPP(5, CHARTBL[0], 11) + (CH)",
02900 SPECIES(CH) = "BBPP(5, CHARTBL[0], 17) + (CH)",
03000 SPCODE(CH) = "BBPP(6, CHARTBL[0], 35) + (CH)",
03100 SPCHAR(CH) = "BBPP(6, CHARTBL[0], 26) + (CH)",
03200 COMMENT and Bit 29 is set for Invisibles ;
03300
03400 COMMENT Table of Character Families and Species
03500
03600 S P E C I E S
03700 F A M I L Y 0 1 2 3 4 5 6 ..... 26
03800 ---------------- ----- ------- ------- -------- ----- ----- ----- ---- ;
03900 LETTQ = " 0",COMMENT Aa Bb Cc Dd Ee Ff Gg .... !_ ;
04000 DIGQ = " 1",COMMENT 0 1 2 3 4 5 6 ... ;
04100 EMPTYQ = " 2" ,
04200 TERQ = " 3",COMMENT } ; COMMENT ) , ] ⊂ ;
04300 QUOTEQ = " 4",COMMENT " ' ;
04400 DOLLARQ = " 5",COMMENT $ ;
04500 BROKQ = " 6",COMMENT [ ;
04600 MULQ = " 7",COMMENT * / DIV % MOD & ;
04700 ADDQ = " 8",COMMENT + - EQV≡ABS ↑ XOR⊗LENGTH ;
04800 BOUNDQ = " 9",COMMENT MAX MIN ;
04900 ODDQ = "10",COMMENT EVEN ODD ;
05000 RELQ = "11",COMMENT < > = ≤ LEQ ≥ GEQ ≠ NEQ ;
05100 NOTQ = "12",COMMENT¬ NOT ;
05200 ANDQ = "13",COMMENT∧ AND ;
05300 ORQ = "14",COMMENT∨ OR ;
05400 MISCQ = "15",COMMENT rest : ← ( ∞ @ | ε ;
05500 MISCMAX = "7", COMMENT, Highest numbered species in MISCQ ;
00100 COMMENT Run-of-mill defines;
00200 TWO(X) = "(1 LSH (X))",
00300 THRU = "STEP 1 UNTIL",
00400 DOWN = "STEP -1 UNTIL",
00500 FALSE = "0", TRUE = "-1",
00600 LOPP(STR) = "DUMMY ← LOP(STR)",
00700 COPY(STR) = "BEGIN STR ← 0&STR ; LOPP(STR) END",
00800 LH(X) = "((X) LSH -18 LAND '777777)",
00900 RH(X) = "((X) LAND '777777)",
01000 LHRH(X,Y) = "((X) LSH 18 LOR (Y))",
01100 WDBRK = "ALTMODE", FONTCHAR = "'177",
01200 CVSR(N) = "CVS(N) & ALTMODE",
01300
01400 COMMENT Break Tables;
01500 TO_VT_SKIP = "15",
01600 TO_COMMA_RPAR = "14",
01700 TO_TERQ_CR = "13",
01800 TO_SEMI_SKIP = "12", COMMENT, for COMMENT comments;
01900 NO_CHARS = "11",
02000 ONE_CHAR = "10", COMMENT, break on aything and append;
02100 LOCAL_TABLE = "9", COMMENT, Do a SETBREAK before using this one;
02200 TO_TB_FF_SKIP = "8", COMMENT, to scan a line number (ignores line feed);
02300 TO_LF_TB_VT_SKIP = "7", COMMENT, to swallow a whole line;
02400 TO_VISIBLE = "6",
02500 ALPHA = "5",
02600 DIGITA = "4",
02700 TO_QUOTE_APPD = "3",
02800 TO_NON_SP = "2",
02900 TEXT_TBL = "1",
03000 TO_CR_SKIP = "16", COMMENT for VERBATIM text lines ;
03100 TO_VBAR_SKIP = "17",
03200 DEFN_TABLE = "18",
03300
03400 COMMENT Buggy Printout ;
03500 DARN = "WARN",
03600 λ = "& "","" &",
03700 VS(SVAR) = " "" SVAR="" & SVAR ",
03800 VI(IVAR) = " "" IVAR="" & CVS(IVAR) ",
03900 MESSMAX = "3",
04000
04100 VIRGIN = "NULL" ; NB End DEFINE ;
00100 TERNAL SAFE INTEGER ARRAY
00200 COMMENT PHRASED ARRAY REMOVED TES 11/15/73;
00300 SIGNALD[0:127], COMMENT, detect last character of signal to trigger response search;
00400 CHARTBL[0:150], COMMENT, current classification and mapping of characters;
00500 INPG[0:10], COMMENT, 1 to 10 mTnP options;
00600 TABSORT[1:28], COMMENT, tab stops in increasing order;
00700 CHANLS[0:15], COMMENT, IDA of SEND portion assigned to each channel, if positive ;
00800 ETCIARRAYS[0:0];
00900
01000 DEFINE MAXBLNMS = "40" ; TES 11/20/73 ;
01100
01200 PRELOAD "MONTH TABLE", "January ", "February ", "March ", "April ",
01300 "May ", "June ", "July ", "August ", "September ", "October ",
01400 "November ", "December " ;
01500 TERNAL STRING ARRAY
01550 MONTH[0:12], COMMENT MUST BE FIRST!! To compute DATE for macros to print ;
01600 BLKNAMES[0:MAXBLNMS], COMMENT, clump and block names ;
01610 PICHAR[0:127], COMMENT, Current meanings of PI CHARacters,
01620 in the form: F N k B1 ... Bk TES 11/29/73
01630 where WIDTH = if F='177 then CW[N] else FN ;
01800 MESSAGE[1:MESSMAX], COMMENT, Short error messages to print on document in D mode. ;
01900 NULLS[0:10], COMMENT, always NULLs;
02000 ETCSARRAYS[0:0] ;
02100
02200 PRELOAD
02300 "ADJUST", "AFTER", "APART", "AREA", "AT",
02400 "BEFORE", "BEGIN", "BELOW", "BLANKPAGE", "BOXFRAME",
02500 "BREAK",
02600 "CC", "CENTER", "CLOSE", "COMMANDCHARACTER", "COMMENT",
02700 "COMPACT", "CONTINUE", "COUNT", "CRBREAK", "CRSPACE",
02800 "DEVICE",
02900 "END",
03000 "FILL", "FLUSHLEFT", "FLUSHRIGHT", "FONT",
03100 "GROUP", "GROUPSKIP",
03200 "IF", "INDENT", "INSERT",
03300 "JUSTJUST",
03400 "LET", "LOCK",
03500 "MACRO",
03600 "NARROW", "NEXT", "NOFILL", "NOJUST",
03700 "ONCE",
03800 "PACK", "PAGEFRAME", "PICHAR", "PLACE",
03810 "PORTION", "PREFACE",
03900 "RECEIVE", "RECURSIVEMACRO", "REQUIRE", "RETAIN",
04000 "SELECT", "SEND", "SHOW", "SKIP", "START",
04100 "SUPERIMPOSE",
04200 "TABS", "TEXTAREA", "TITLEAREA", "TURNOFF", "TURNON",
04300 "VARIABLE", "VERBATIM",
04400 "WIDEN",
04500 NULL ;
04600 TERNAL STRING ARRAY MANWD[0:65] ; comment, Only first words of commands are reserved ;
04700
04800 PRELOAD NULL, " ", " ", " ", " ", " ", " ",
04900 " ", " ", " ", " " ;
05000 TERNAL SAFE STRING ARRAY SPSARR[0:10] ;
00100 DEFINE DSCR="COMMENT ";
00200 DSCR **** DYNAMIC ARRAY MANIPULATION PACKAGE ****
00300
00400
00500
00600 ;
00700
00800
00900 DEFINE TEMPO="'14", LPSA="'13";
01000 EXTERNAL INTEGER SIMPLE PROCEDURE LRMAK(INTEGER L,H,D);
01100 EXTERNAL INTEGER SIMPLE PROCEDURE LRCOP(INTEGER A);
01200 EXTERNAL SIMPLE PROCEDURE ARYEL(INTEGER I);
01300
01400 DSCR PTR ← CREATE(LOWBND,HIBND)
01500 CAL MACRO -- EXPRESSION
01600 PAR LOWBND IS LOWER BOUND FOR INTEGER ARRAY
01700 HIBND IS UPPER BOUND
01800 RES PTR IS AN ARRAY DESCRIPTOR
01900 DES CALLS LRMAK TO GET AN UNMARKED ARRAY
02000 ;
02100
02200 DEFINE CREATE(L,H)= "LRMAK(L,H,1)";
02300
02400 DSCR MAKEBE(PTR,ARRAY)
02500 CAL MACRO -- STATEMENT
02600 PAR PTR IS INTEGER HOLDING ARRAY DESCRIPTOR
02700 ARRAY IS DUMMY TO RECEIVE DESCRIPTOR (DON'T LEAVE THAT BLOCK!)
02800 DES EFFECT IS "ARRAY←PTR", BUT SAIL WON'T DO THAT DIRECTLY
02900 ;
03000
03100 DEFINE MAKEBE(I,A)="
03200 START_CODE
03300 MOVE TEMPO,I;
03400 MOVEM TEMPO,A;
03500 END ";
03600
03700 DEFINE IDASSIGN(EX,ALIAS)="BEGIN DUMMY←EX;
03800 IF DUMMY ≤ 0 THEN WARN(NULL,""NEGATIVE ALIAS FOR INTEGER ARRAY"") ELSE comment ************* ;
03900 MAKEBE(DUMMY, ALIAS) END" ;
04000
04100 DEFINE SMAKEBE(I, A) = "START_CODE HRRO TEMPO,I ; MOVEM TEMPO, A ; END",
04200 SIDASSIGN(EX, ALIAS) = "BEGIN DUMMY←EX ; SMAKEBE(DUMMY, ALIAS) END" ;
00100 TERNAL INTEGER
00200 SYMNO, comment, size of hashed SYMBOL Table;
00300 XSYMNO, comment, size of SYM and NUMBER--first SYMNO elemts hash-searched, rest linear- searched;
00400 ISIZE, SSIZE, ITSIZE, STSIZE, SIZE, comment of ISTK,SSTK,ITBL,STBL,NESTs;
00500 IHED, IHIGH, SHIGH, LAST, comment last used (highest unavailable) subscript;
00600 OLX,NOLX,GRPOLX,GRPTOP, OLXX, OLMAX, comment,
00700 used words of OWLS, LENGTH(OWLS), total of all declared areas;
00800 EOF, BRC, FLAG, comment, I/O control variables;
00900 CONTENTS, DEBUG, DEVICE, comment, RPG-derived switches;
01000 LMARG, RMARG, comment, margin settings in this area;
01100 OAKS,POSN, BRKPT,BRKPOSN,BRKXPOSN,BRKFAKE, BRKABX, BRKBLX,
01200 BRKSPCS, JUSTIFY, LASTWDBRK, BRKPLBL, TABI,RBOUND,
01300 MAXIM,FMAXIM,NMAXIM, comment, Line-Filler (OWL) variables;
01400 STANDARD, comment, ptr to def in ISTK of MACRO !STANDARD;
01500 INSETS, comment, ptr to AT <n> of smallest n (ISTK ptr);
01600 INPUTCHAN, TECOFILE, comment, current input channel ;
01700 INPGS, INPGX,comment, last and current subscript in array INPG of mTnP options;
01800 SWDBACK, comment, -1=just SWICHBACKed from a file, +1=just WARNed ;
01900 PUBSTD, comment, whether compiling PUBSTD.DFS (suppress pgno display) ;
02000 ONE, comment, 1 for variable upper bound of ALIAS arrays;
02100 TAG, comment, STBL address of variable TAG;
02200 MANUS_SKIP_, comment, _SKIP_ value after execution of MANUS substring operation;
02300 INF, comment, ∞ value for current MANUS substring spec;
02400 I, J, K, L, M, N, DUMMY, comment, short-term loan currency ;
02500 DEPTH, comment, block depth -- MANWDS are at 0, main program at 1;
02600 ON, comment, FALSE if parsing false part of conditional or if defining a response body;
02700 FHIGH, FWIDE, PHIGH, PWIDE, comment, Dimensions of the current Frame and Page Frame;
02800 EPSCHAR, comment, char serving { function ;
02900 PAGEMARKS, PAGEWAS, comment, no. of PM's on this page: passed, responded to ;
03000 RESP_BODY, comment, TRUE if defining a response body;
03100 DCLR_LET, comment, TRUE if scanning after = of `LET X=..';
03200 DCLR_ID, comment, TRUE if in a declaration scanning an identifier that is to be declared;
03300 DEFINING, comment TRUE if reading ⊂definition⊃ ;
03400 WAITRESP, comment, head of LL of Responses to undeclared areas and units;
03500 LEADRESPS, comment, head of LL of "AT n" responses, in ascending order by n ;
03600 COMMAND_CHARACTER, TAB_CHARACTER,
03700 PORTS, THISPORT, SEQPORT, PORTLL, comment, Portions: # of, last declared, last in seq, seq LL;
03800 INTER, SINTER, INTERS, comment Intermediate output channel, no. of intermediate output files ;
03900 STATUS, comment, Current place area UNOPENED (0), OPEN (1), CLOSED (2), GONE (3) ;
04000 OLDPGIDA, NEWPGIDA, FRAMEIDA, MOLESIDA, SHORTIDA, OWLSIDA, AREAIDA, WBOXIDA,
04100 SYMIDA, NUMBIDA, ISTKIDA, SSTKIDA, ITBLIDA, STBLIDA, INESTIDA, SNESTIDA,
04200 BYTEWD, comment, lots of byte pointers point here ;
04300 COLS, COL, PAL, LINES, LINE, PINE, COVERED, UNDEAD, comment, Current position in place area ;
04400 NULLAREAS, comment, LL of Made but Unopened areas (Status=0) ;
04500 PREFMODE, comment, n from nS option ;
04600 BLNMS, comment, top of BLKNAMES stack ;
04700 MYEND, comment flag for END routines (see TOEND in MAN.SAI) ;
04800 FOOTTOP, comment TRUE iff expecting 1st line of 1st footnote belonging to a body line;
04900 OWLSEQ, comment, counts total output lines red'd by OWLS arrays ;
05000 WISTK, WITBL, WINEST, WSSTK, WSTBL, WSNEST, WSYM, WNUMBER,
05100 WOLDPAGE, WNEWPAGE, WTHISFRAME, WMOLES, WNMOLES,
05200 WOWLS, WNOWLS, WTHISAREA, WWAITBOX, WAVAILREC,
05300 WAA, WNAA, WSHORT, WNSHORT, comment, WHATIS(dummy arrays) ;
05400 SWFLG, comment, used only in SWICHF TES 12/3/73 ;
05500 INPICHAR, comment for DPICHAR and RDENTITY/OCTAL TES 12/6/73 ;
00100 UPCAS3, UPCAS5, UPCAS6, comment, byte pointers for CAPITALIZE,STRLSS;
00200 SYMTYPE, SYMIX, comment, fields of a descr. looked up by SIMLOOK or SIMNUM;
00300 LONG, comment TRUE in a LONG etc. command;
00400 SYMPAGE, IXPAGE, PATPAGE, comment, SYM subscript, IX field, counter subscript for PAGE;
00500 IXCOMMENT, IXEND, IXFOOT, IXTAG, comment, IX fields for reserved words;
00600 SYMTEXT, IXTEXT,
00700 LLPREV, LLTHIS, LLPOST, comment, results of LLSCAN (a macro) ;
00800 AMSAND, LBRACK, UARROW, DARROW, UNDERBAR, LCURLY, DOLLAR,
00900 comment SPCHAR codes of & [ ↑ ↓ _ { $ ;
01000 EXNEXTPAGE, comment TRUE while executing NEXT PAGE (prevents recursion) ;
01100 MESGS, comment, how many messages in MESSAGE[] ;
01200 LDEFN_BRC, comment, initial LENGTH(DEFN_BRC) ;
01300 GENSYM ;
01400
01500 TERNAL STRING
01600 C!, !, comment C and P-values of incremented counter after NEXT statement;
01700 INPUTSTR, comment, current input string;
01800 LIT_ENTITY, LIT_TRAIL, comment,
01900 for the entity in THATWD: its literal input form & trailing spaces;
02000 TEXT_BRC, comment, break characters (always including CR LF SP ALTMODE RUBOUT -.?! );
02100 DEFN_BRC, comment, break characters (char serving as {, also }, LF, ⊂, ⊃, ∃, letters) ;
02200 SIG_BRC, comment, break characters for Signals (first char of each signal) ;
02300 PAGEVAL, comment, the P-value of this PAGE when it was opened ;
02400 SRCPAGE, SRCLINE, MACLINE, LSTOP, comment, input file line nos.;
02500 INFILE, OUTFILE, TMPFILE, comment, RPG-determined file names;
02600 MAINFILE, comment first name of INFILE, filled out with colons to 6 chars ;
02700 THISFILE, comment, the first name of the file being read now, colon-filled ;
02800 LIBPPN, comment usually [1,TES], but [2,TES] if logged in as [2,TES] ;
02900 OWL, LBF, OLBF, comment, Line-Filler variables ;
03000 DUMMYSTR, S, comment, just strings to throw around;
03100 THISWD,THATWD, comment, this (ITS) and sometimes next entity from scanner;
03200 CHARSP, comment, SPCHAR to character convert table ;
03300 FOOTSEP, comment, line to draw above footnotes ;
03350 FSFONT, FOOTGAP, comment 11/30/73 TES ;
03400 STR1, STR2, STR3, comment temporaries ;
03500 DELINT, comment, Delete Intermediate Files Option Y/N/A ;
03600 JOBNO, CONDIR, comment, job number & connected dir (TENEX only--else NULL) TES 10/25/73;
03700 VUNDERLINE, COMMENT TES 10/22/73 The UNDERLINE character ;
03800 ETCS;
03900
04000 EXTERNAL INTEGER RPGSW, _SKIP_ ;
04100
04200 TERNAL INTEGER
04300 comment, BEGINBLOCK BLT's these to ISTK (keep them together): ;
04400 THISTYPE,THATTYPE, comment, THATTYPE is parser type of THATWD:
04500 -2=EMPTYQ ≥0=IDENTIFIER(exact value is no. of trailing spaces)
04600 THISTYPE is parser type of THISWD:
04700 1..15=TYPEN(ID symbol) 0=Undeclared ID
04800 -1=CONSTANT -2=EMPTYQ ≤-3=SP.CHAR.(-FAMILY no.);
04900 SYMB, comment, the SYM subscript of THISWD, if THISISID;
05000 IX, comment, the IX field of NUMBER for THISWD, if THISISID;
05100 STARPOSN, RIPTPOSNS, AMPPOSN,
05200 PLBL,FIRST,NOPGPH,SPCS,ABOVEX,BELOWX,HEIGHT,SUPERSUB,
05300 UNDERLINING,FAKE,MIDWORD,PUNC,INDENT,LBP,XLBP,LBO,LBK,ILBF,
05400 BRKFONT ; TES 11/20/73 ;
05500 DEFINE SOMEWDS="4",MIDWDS="26" ; comment, how many variables in above list ;
00100 TERNAL INTEGER XMAXIM, COMMENT LDX LINE WIDTH;
00200 OLDFONT , comment last XGP font ;
00300 THISFONT , comment current XGP font ;
00400 KSETCON, COMMENT KSET OFFSET IN CW;
00500 XGENLINES, COMMENT NUMBER OF LINES GENERATED BY LDX MACROS;
00600 XPOSN, COMMENT LDX EQUIV OF POSN;
00700 XCRIBL, COMMENT TRUE IF IN XCRIBL MODE;
00800 XCMDCHR, COMMENT SPCHAR CODE FOR ⊗;
00900 XNJB, COMMENT SPCHAR CODE FOR #;
01000 KSETSWAP, COMMENT SPCHAR CODE FOR %;
01100 FSHORT; COMMENT FAKE SHORT FOR XCRIBL MODE SPACES;
01200
01300 TERNAL INTEGER CHARW; COMMENT AVERAGE CHAR WIDTH (WIDTH OF '177);
01400
01500 TERNAL INTEGER WCW ; COMMENT WHATIS CW;
01600 TERNAL INTEGER ARRAY FONTFIL[1:35] ; COMMENT HOLDS CW POINTERS ;
01700 TERNAL SAFE INTEGER ARRAY FNTINF[1:35] ; comment font info ;
01800 DEFINE CHARH="FNTINF[THISFONT]", STDCHARH="FNTINF[DEFAULTFONT]";
01900 TERNAL INTEGER BASELINE;
02000 TERNAL INTEGER OVEREST; COMMENT SHORT FONT KLUDGE! ;
02100
02200 TERNAL STRING XGPCMD , comment XGP commands to go on next line ;
02300 CMDFILE; COMMENT TEXT OF XGP COMMAND FILE ;
02400
02500 DEFINE CHARTORAST(VAL)="IF XCRIBL THEN CHARW*(VAL) ELSE VAL";
02600
02700 COMMENT INSTALLATION DEPENDENT DEFAULTS ;
02800
02900 IFC VERSION=SAILVER THENC
03000 DEFINE FONTPPN = "'704760637163", COMMENT [XGP,SYS];
03100 DEFAULTFONT = "1",
03200 FONTEXT = "'465664000000"; COMMENT FNT ;
03300 ENDC
03400 IFC VERSION=CMUVER THENC
03500 DEFINE FONTPPN = "'001343303360", COMMENT [A730KS00] ;
03600 DEFAULTFONT = "10",
03700 FONTEXT = "'536364000000"; COMMENT KST ;
03800 DEFINE LIBDEV = """DSK""";
03900 ENDC
04000 IFC VERSION=PARCVER THENC
04100 IFC TENEX THENC
04200 DEFINE DEFAULTFONT="1",
04300 FONTPPN="""<FONTS>""",
04400 FONTEXT=""".XH""";
04500 ELSEC
04600 DEFINE DEFAULTFONT="1",
04700 FONTPPN="1",
04800 FONTEXT="CVSIX(""XH"")";
04900 ENDC
05000 ENDC